package com.coffee.sku.api.sku.result;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class SkuContentResult implements Serializable {
    private static final long serialVersionUID = -1L;
    private Integer id;
    private Integer skuId;
    private String title;
    private String subtitle;
    private Integer supplierId;
    private String supplierName;
    private String supplierGoodsName;
    private Integer supplierGoodsId;
    private Integer categoryId;
    private String categoryName;
    private List<Integer> categoryIds;
    private List<String> categoryNames;
    private String pidPath;
    private String cover;
    private String subCover;
    private String details;
    private String goodsAttribute;
    private String otherAttribute;
    private String logistics;
    private String isIntegral;
    private Double integralDeduction;
    private Integer integral;
    private String isSpellOrder;
    private Integer spellOrderCityId;
    private Integer spellOrderProvinceId;
    private String spellOrderCity;
    private String skuType;
    private String isDelete;
    private Integer spellOrderCondition;
    private Integer spellOrderPeople;
    private Date createTime;
    private String isApprove;
    private String approveRefuseReason;
    private String isDisable;
    private String isEnable;
    private List<SkuSalesInformationResult> skuSalesInformationResults;
    private Integer status;

    public Integer getStatus() {
        if ("W".equals(this.isApprove)) {
            this.status = 0;
        } else if ("N".equals(this.isApprove)) {
            this.status = 1;
        } else if ("N".equals(this.isEnable)) {
            this.status = 3;
        } else if ("Y".equals(this.isEnable)) {
            this.status = 4;
        }
        return status;
    }
}

